﻿namespace RuoVea.Fams.Server.Models;

/// <summary>
/// 资产维修记录
/// 创建人：Admin
/// 日期：2023年10月12日
/// 描述：资产维修记录实体模型
/// </summary>
[SugarTable(nameof(FamsRecords), "资产维修记录")]
public class FamsRecords : EntityBase
{
    /// <summary>
    /// 资产标识符（外键）
    /// </summary>
    [Required]
    [SugarColumn(ColumnDescription = "资产标识符")]
    public long AssetId { get; set; }

    /// <summary>
    /// 维修单号
    /// </summary>
    [Required, MaxLength(50)]
    [SugarColumn(ColumnDescription = "维修单号")]
    public string Order { get; set; }

    /// <summary>
    /// 维修日期
    /// </summary>
    [Required]
    [SugarColumn(ColumnDescription = "维修日期")]
    public DateTime Date { get; set; }

    /// <summary>
    /// 维修公司
    /// </summary>
    [MaxLength(100)]
    [SugarColumn(ColumnDescription = "维修公司", IsNullable = true)]
    public string Company { get; set; }

    /// <summary>
    /// 维修金额
    /// </summary>
    [SugarColumn(ColumnDescription = "维修金额", IsNullable = true)]
    public decimal? Cost { get; set; }

    /// <summary>
    /// 维修工时（小时）
    /// </summary>
    [Required]
    [SugarColumn(ColumnDescription = "维修工时（小时）")]
    public decimal Hours { get; set; }

    /// <summary>
    /// 维修内容
    /// </summary>
    [SugarColumn(ColumnDescription = "维修内容")]
    public string Content { get; set; }

    /// <summary>
    /// 维护类型
    /// </summary>
    [SugarColumn(ColumnDescription = "维护类型")]
    public string MaintenanceType { get; set; }

    /// <summary>
    /// 验收人员
    /// </summary>
    [SugarColumn(ColumnDescription = "验收人员")]
    public long AcceptancePersonId { get; set; }
}